<!-- 首页带logo导航的代码（下面） -->
<div id="index-login-daohang">
	<div id="index-login-daohang-bao">
		<div id="logo">
			<a href="http://localhost:8080/jump/index">
				<img src="../images/navimg/1.jpeg" />
			</a>
		</div>

		<div id="index-login-daohang-zhong">
			<div id="index-login-daohang-zhong-shang">
				<a class="daohangCheck" value="newhouse">新房</a>
				<a value="old">二手房</a>
				<a value="zhouse">租房</a>
			</div>
			<div id="index-login-daohang-zhong-xia">
				<form>
					<div class="layui-input-block">
						<input style="width: 450px;height: 40px; display: inline-block;" type="text" name="title" lay-verify="title"
						 autocomplete="off" placeholder="请输入小区名称" class="layui-input indexSouText">
						<div style="float: right;"><img onclick="indexSou()" style="width: 80px;" src="../images/navimg/2.png" /></div>
					</div>
				</form>
			</div>
		</div>

		<div id="index-login-daohang-you">
			<a class="tfy-map" href="javascript:;">地图找房</a>
			<a rel="nofollow" class="tfy-new" href="javascript:;">发布信息</a>

		</div>
	</div>
</div>

<!-- 各个页面不带logo的导航 -->


<div  id="daohang">
	<div class="w" >
			<ul id="nologo">
				<li class="active">
					<h3><a href="/jump/index">首页</a></h3>
				</li>
				<li>
					<h3><a href="/selhouse/newhouse">新房</a></h3>
				</li>
				<li>
					<h3><a href="/selhouse/newhouse2?type=2">二手房</a></h3>
				</li>
				<li>
					<h3><a href="/selhouse/newhouse2?type=3">租房</a></h3>
				</li>
				<li>
					<h3><a href="/Adviser/guwen">置业顾问</a></h3>
				</li>
				<li>
					<h3><a href="/jump/dataimg">查房价</a></h3>
				</li>
				<li>
					<h3><a href="/jump/news">资讯</a></h3>
				</li>
				<li>
					<h3><a href="javascript:;">地图找房</a></h3>
				</li>
				<li>
					<h3><a href="javascript:;">找中介</a></h3>
				</li>
				<li>
					<h3><a href="/Market/tudi">土拍查询</a></h3>
				</li>
				<li>
					<h3><a href="/Presell/yuyue">预售查询</a></h3>
				</li>
			</ul>
	</div>
</div>

<script>
	$(document).ready(function() {
		$(window).scroll(function() {
			if($("#nologo .active").text()=="首页"){
				if ($(document).scrollTop() <= 456) {
					$("#index-login-daohang").css("position", "relative");
				}

				if ($(document).scrollTop() >= 456) {
					$("#index-login-daohang").css("position", "fixed");
					$("#index-login-daohang").css("top", "0px");
				}
			}else{

				if ($(document).scrollTop() <= 156) {
					$("#index-login-daohang").css("position", "relative");
				}

				if ($(document).scrollTop() >= 156) {
					$("#index-login-daohang").css("position", "fixed");
					$("#index-login-daohang").css("top", "0px");
				}
			}

		});

	});

	$("#index-login-daohang-zhong-shang>a").click(function() {
		$(this).siblings().removeClass("daohangCheck");
		$(this).addClass("daohangCheck");
	});
	function indexSou(){
		var path = $(".daohangCheck").attr("value");
		if(path!="newhouse"){
			location.href = "/selhouse/newhouse2?type="+(path=="old"?2:3)+"&name2="+$("[name=title]").val();
		}else{
			location.href = "/selhouse/"+path+"?name2="+$("[name=title]").val();
		}

	};
</script>
